package com.blueocean_health.care.management.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.blueocean_health.care.management.common.base.string.StringUtils;
import com.blueocean_health.care.management.domain.base.ParamZi;
import com.blueocean_health.care.management.domain.base.SysResult;
import com.blueocean_health.care.management.domain.vo.Criteria;
import com.blueocean_health.care.management.service.IParamService;
@RestController
@RequestMapping(value="paramMgr")
public class ParamHandler {
	@Resource
	private IParamService paramService;
	/**
	 * 获取指定类型的参数列表
	 * @param paramType
	 * @return
	 */
	@RequestMapping(value="params")
	public SysResult getParams(@RequestBody(required = false) Criteria criteria){
		//criteria.setDisplay(YesOrNo.YES);
//		User user = LocalManager.getVal(LocalManagerType.USER_WEB);
		if(StringUtils.isEmpty(criteria)){
			criteria = new Criteria();
		}
//		criteria.setHospitalId(user.getHospitalId());
		List<ParamZi> params = paramService.getParams(criteria);
			return SysResult.ok(params);
		}

}
